The Standard Alert Structure
NEW WITH THE APPEARANCE MANAGER
A standard alert structure of typeAlertStdAlertParamRec
can be used when you call the functionStandardAlert
to customize the alert box.
struct AlertStdAlertParamRec { Boolean movable; Boolean helpButton; ModalFilterUPP filterProc; StringPtr defaultText; StringPtr cancelText; StringPtr otherText; SInt16 defaultButton; SInt16 cancelButton; UInt16 position; }; typedef struct AlertStdAlertParamRec AlertStdAlertParamRec; typedef AlertStdAlertParamRec *AlertStdAlertParamPtr;
Field Description
movable
- A Boolean value indicating whether or not the alert box is movable.
helpButton
- A Boolean value indicating whether or not the alert includes a Help button.
filterProc
- If the value in the
movable
field istrue
(alert is movable), then specify in this parameter a universal procedure pointer to an application-defined filter function that responds to events not handled byModalDialog
. If you do, all events will get routed to your application-defined event filter function for handling, even when your alert box window is in the background. If you set this parameter tonil
, the Dialog Manager uses the standard event filter function.defaultText
- Text for button in OK position; see "Alert Default Text Constants". The button automatically sizes and positions itself in the alert box. To specify that the default button names should be used, pass
-1
. To indicate that no button should be displayed, passnil
.cancelText
- Text for button in Cancel position; see "Alert Default Text Constants". The button automatically sizes and positions itself in the alert box. To specify that the default button names should be used, pass
-1
. To indicate that no button should be displayed, passnil
.otherText
- Text for button in leftmost position; see "Alert Default Text Constants". The button automatically sizes and positions itself in the alert box. To specify that the default button names should be used, pass
-1
. To indicate that no button should be displayed, passnil
.defaultButton
- Specifies which button acts as the default button; see "Alert Button Constants".
cancelButton
- Specifies which button acts as the Cancel button (can be 0); see "Alert Button Constants".
position
- The alert box position, as defined by a window positioning constant; see Macintosh Toolbox Essentials (page 4-126) for a discussion of these constants. In this structure, the constant
kWindowDefaultPosition
is equivalent to the constantkWindowAlertPositionParentWindowScreen
.
Subtopics
- Alert Button Constants
- Alert Default Text Constants